package com.choosefine.springboot.devops.system.service;

import com.choosefine.springboot.devops.base.service.BaseService;
import com.choosefine.springboot.devops.system.dto.LoginDTO;
import com.choosefine.springboot.devops.system.model.System;
import org.beetl.sql.core.SQLManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class SystemService extends BaseService{

	public System selectById(Integer id){
		Map param=new HashMap();
		param.put("id",id);
		System result=sqlManager.selectUnique("system.selectById",param,System.class);
		return result;
	}

	public System login(LoginDTO loginDTO){
		System result=sqlManager.selectUnique("system.login",loginDTO,System.class);
		return result;
	}

}
